package chess;

public abstract class Piece
{
    int pieceColor;
    
    /**
     * This function returns the color of this piece.
     * 
     * @author Anthony Hilyard
     * @return  The color of the piece.  0 = black, 1 = white
     */
    int getColor()
    {
        return pieceColor;
    }//end of getColor
        
    /**
     * This function is used to determine if this piece can move
     * from a source space to a destination space.
     * 
     * @author Anthony Hilyard
     * @param sourceX   The X-coordinate of the source space.
     * @param sourceY   The Y-coordinate of the source space.
     * @param destX     The X-coordinate of the destination space.
     * @param destY     The Y-coordinate of the destination space.
     * @return  An integer that represents if the given move is allowed.
     *          0 = no, 1 = yes, 2 = this piece is a pawn and is capturing.
     */
    abstract int canMove(int sourceX, int sourceY, int destX, int destY);
    
    /**
     * This function returns a character that corresponds to the type of piece
     * this is.
     * 
     * @author Anthony Hilyard
     * @return  'P' = Pawn, 'N' = Knight, 'B' = Bishop, 'R' = Rook,
     *          'Q' = Queen, 'K' = King.
     */
    abstract char getType();
    
} //end of Piece